package com.grt192.mechanism;

import simulator.Simulator;

import com.grt192.core.Mechanism;

public class CreateBase implements Mechanism {

	private boolean suspended;
	private Simulator sim;

	public CreateBase(Simulator sim) {
		this.sim = sim;
		suspended = false;
	}

	public void goForward() {
		sim.goForward();
	}

	public void goBackward() {
		sim.goBackward();
	}

	public void turnRight() {
		sim.turnRight();
	}

	public void turnLeft() {
		sim.turnLeft();

	}

	public void waitDistance(int dist) {
		// TODO read directly from Simulator(getPosition)
		sim.waitDistance(dist);

	}

	public void waitAngle(int degrees) {
		// TODO read directly from Simulator
		sim.waitAngle(degrees);
	}

	@Override
	public void pause() {
		suspended = true;
	}

	@Override
	public void unPause() {
		suspended = false;
	}

	@Override
	public void halt() {
		sim.stop();
	}

}
